<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>详细</title>
</head>
<body>


	<div class="container-fluid">
		<div class="modal-header">
			<button type="button" class="close" data-ng-click="Model.cancel()" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			<h5>{{Model.title}}</h5>
		</div>
		<div class="modal-body">

			<form class="form-horizontal" name="baseinfo_fileFactory_single_form">
			
				<div class="row">
					<div class="col-sm-6">
						<div class="form-group form-group-sm">
							<label class="col-sm-4 control-label">类型</label>
							<div class="col-sm-8">
								<select-with-label 
									select-data="[
			                        {value:'GCDA',label:'工厂'}
			                        ]" 
									select-label="label"
									select-value="value"
									target-data="Model.dataMaster"
									target-label="billTypeName"
									target-value="billType"
									row-index="Model.dataMaster.getCurrentIndex()"
									vertical="dropdown"
									horizon="right"
									value-show="false">
								</select-with-label>
							</div>
						</div>
					</div>
					<div class="col-sm-6">
						<div class="form-group form-group-sm">
							<label class="col-sm-4 control-label">状态</label>
							<div class="col-sm-8">
								<input type="checkbox" class="form-control"
									data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].status.value"
									bootstrap-switch data-size="small" on-text="启用" off-text="停用" off-color="danger"
									data-ng-true-value="'open'" data-ng-false-value="'close'"/>
							</div>
						</div>
					</div>
				</div>
				<div class="form-group form-group-sm">
					<label class="col-sm-2 control-label">编码</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" ng-change="Model.dataMaster.validData(Model.dataMaster.getCurrentIndex(),'factoryNo')"
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].factoryNo.value"
							placeHolder="为空则系统会自动编码" name="factoryNo" />
						<span class="text-danger" ng-if="Model.dataMaster.rows[Model.dataMaster.currentIndex].factoryNo.invalid==1">工厂编码已经存在</span>
					</div>
				</div>
				<div class="form-group form-group-sm has-warning">
					<label class="col-sm-2 control-label">名称</label>
					<div class="col-sm-10">
						<input type="text" class="form-control"  ng-change="Model.dataMaster.validData(Model.dataMaster.getCurrentIndex(),'factoryName')"
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].factoryName.value" 
							name="factoryName" />
						<span class="text-danger" ng-if="Model.dataMaster.rows[Model.dataMaster.currentIndex].factoryName.invalid==1">工厂名称已经存在</span>
					</div>
				</div>
				<div class="form-group form-group-sm">
					<label class="col-sm-2 control-label">地名</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" 
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].fAddressName.value" />
					</div>
				</div>
				<div class="form-group form-group-sm">
					<label class="col-sm-2 control-label">所在地区</label>
					<div class="col-sm-10">
						<div class="input-group">
							<input type="text" class="form-control" data-ng-readonly="true" value="{{Model.dataMaster.rows[Model.dataMaster.currentIndex].fProvince.value}}{{Model.dataMaster.rows[Model.dataMaster.currentIndex].fCity.value}}{{Model.dataMaster.rows[Model.dataMaster.currentIndex].fZone.value}}"/>
							<span class="input-group-btn">
								<button class="btn btn-default btn-sm" data-ng-disabled="Model.dataMaster.readonly();" data-ng-click="Model.triggerRegionCodeClick()">
									<span class="glyphicon " data-ng-class="{'glyphicon-th-list':(Model.dataMaster.rows[Model.dataMaster.currentIndex].fAddress.value==null || Model.dataMaster.rows[Model.dataMaster.currentIndex].fAddress.value==''),'glyphicon-remove':!(Model.dataMaster.rows[Model.dataMaster.currentIndex].fAddress.value==null || Model.dataMaster.rows[Model.dataMaster.currentIndex].fAddress.value=='')}"
										aria-hidden="true"></span>
								</button>
							</span>
						</div>
					</div>
				</div>
				<div class="form-group form-group-sm">
					<label class="col-sm-2 control-label">详细地址</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" 
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].fAddressDetail.value"/>
					</div>
				</div>
				
				<div class="form-group form-group-sm">
					<label class="col-sm-2 control-label">联系人</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" 
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].contacts.value"/>
					</div>
				</div>
				<div class="form-group form-group-sm">
					<label class="col-sm-2 control-label">电话</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" 
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].fPhone.value"/>
					</div>
				</div>
				<div class="form-group form-group-sm">
					<label class="col-sm-2 control-label">移动电话</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" 
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].mobilePhone.value"/>
					</div>
				</div>
				<div class="form-group form-group-sm">
					<label class="col-sm-2 control-label">电子邮箱</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" 
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sMail.value"/>
					</div>
				</div>
				
			</form>
				
				<uib-tabset> 
					<uib-tab heading="logo"> <br>
						<form class="form-horizontal" name="baseinfo_fileFactory_single_form_images">
							<attachments permission="public"
								data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].images.value"
								cantedit="Model.dataMaster.readonly()" 
								template-url="js/_directives/attachimages.html "
								width="250px" height="154px" cols=1 count=1>
							</attachments>	
						</form>
					
					</uib-tab>
					<uib-tab heading="简介"> <br>
						<form class="form-horizontal" id="baseinfo_fileFactory_single_form_summary">

				<div class="form-group">
					<label class="col-sm-2 control-label">简介</label>
					<div class="col-sm-10">
						<textarea rows="5" class="form-control" 
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].summary.value">
						</textarea>
					</div>
				</div>
						</form>
					</uib-tab>
					<uib-tab heading="备注"> <br>
						<form class="form-horizontal" id="baseinfo_fileFactory_single_form_comments">

				<div class="form-group">
					<label class="col-sm-2 control-label">备注</label>
					<div class="col-sm-10">
						<textarea rows="5" class="form-control" 
							data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].comments.value">
						</textarea>
					</div>
				</div>
						</form>
					</uib-tab>
					
				</uib-tabset>

			<pre hidden="true">
			[baseinfo_fileFactory_single_form.factoryNo.$dirty]:{{baseinfo_fileFactory_single_form.factoryNo.$dirty}}
			[baseinfo_fileFactory_single_form.factoryNo.$valid]:{{baseinfo_fileFactory_single_form.factoryNo.$valid}}
			[baseinfo_fileFactory_single_form.factoryNo.$error]:{{baseinfo_fileFactory_single_form.factoryNo.$error}}
			</pre>
			

		</div>
		<div class="modal-footer">
			<button class="btn btn-primary" 
			data-ng-disabled="baseinfo_fileFactory_single_form.factoryName.$dirty && baseinfo_fileFactory_single_form.factoryName.$invalid 
			|| baseinfo_fileFactory_single_form.factoryName.$error.required 
			"
			data-ng-click="Model.ok()">确定</button>
			<button class="btn btn-warning" data-ng-click="Model.cancel()">取消</button>
		</div>

	</div>




</body>
</html>